<template>
    <div class="home-notice">
        <swiper auto
        :loop="true"
        height="44px"
        direction="vertical"
        :interval=2000
        :show-dots="false">
            <i class="iconfont icon-notificationfill"></i>
            <swiper-item v-for="(i,index) in lists" :key="index">
                <p @click="jumpTo(i)">{{i.context}}</p>
            </swiper-item>
        </swiper>
    </div>
</template>

<script>
    /**
     * Created by 吴彦祖 on 2018/3/16.
     * 通知列表，用于我的公共通知
     */
    import { Swiper, SwiperItem } from 'vux' ;
    export default {
        name: 'home-notice',
        props:{
        	lists:{
        		type:Array,
                default:()=>{
        			return [{context:'测试测试测试'},{context:'测试测试测试'},]
                }
            }
        },
        components: {
            Swiper,
            SwiperItem
        },
        methods:{
            jumpTo(item){
                this.$emit('indexJump',item);
            }
        }
    }
</script>

<style lang="less">
    @import '../style/mixin.less';
    .home-notice {
        padding: 0 12px;
        font-size: @font-size-small;
        line-height: 44px;
        color: @color-text-third;
        background: @color-white;
        .iconfont {
            color: @color-primary;
        }
        p {
            padding-left: 24px;
        }
    }
</style>
